

#include <inttypes.h>
#include <stdio.h>
#include <assert.h>

# include "native_stack.h"
# include "new.h"

int main()
{
    Object* stack = new(NativeStack, sizeof(uint32_t));
    push_front(stack, 12);
    push_front(stack, 12);
    push_front(stack, 12);
    push_front(stack, 12);
    push_front(stack, 42);
    printf("stack = %s (size = %u)\n", str(stack), size(stack));
    assert(front_uint32(stack) == 42);
    pop_front(stack);
    assert(front_uint32(stack) == 12);
    push_front(stack, 42);
    assert(front_uint32(stack) == 42);
    delete(stack);
    return 0;
}
